package com.yowasa.xiuxian.engine.hone.special;

import com.yowasa.xiuxian.annoations.SE;
import com.yowasa.xiuxian.engine.HoneEngine;
import com.yowasa.xiuxian.engine.hone.MentalInterface;
import com.yowasa.xiuxian.engine.hone.SpecialInterface;
import com.yowasa.xiuxian.entity.bo.user.UserBO;
import com.yowasa.xiuxian.entity.bo.user.UserBattle;
import com.yowasa.xiuxian.entity.enums.ElementEnum;
import com.yowasa.xiuxian.entity.enums.StageEnum;
import com.yowasa.xiuxian.exception.HandlerException;
import org.springframework.util.StringUtils;

@SE(name = "采水诀")
public class CaiShuiJue implements SpecialInterface {
    @Override
    public ElementEnum getElement() {
        return ElementEnum.WATER;
    }

    @Override
    public void limit(UserBO user) {
        if (user.getStage() < StageEnum.JIE_DAN.getLevel()) {
            throw new HandlerException("学习/使用采水诀必须要了彻之白以上");
        }
    }

    @Override
    public String limitDesc() {
        return "境界达到了彻之白";
    }

    @Override
    public String desc() {
        return "修习之后可同时使用的战技上限+1";
    }

    @Override
    public void effectOnce(UserBO userBO) {
        userBO.getUserConfig().setStrategyMax(userBO.getUserConfig().getStrategyMax() + 1);
    }
}
